using Unity.Entities;
using UnityEngine;

class GameManagerAuthoring : MonoBehaviour
{
    public GameObject enemyPre;
    public GameObject bulletPre;
    public GameObject expPre;
}

class GameManagerAuthoringBaker : Baker<GameManagerAuthoring>
{
    public override void Bake(GameManagerAuthoring authoring)
    {
        var en=GetEntity(authoring,TransformUsageFlags.None);
        var enemy=GetEntity(authoring.enemyPre,TransformUsageFlags.Dynamic);
        var bullet=GetEntity(authoring.bulletPre,TransformUsageFlags.Dynamic);
        var exp=GetEntity(authoring.expPre,TransformUsageFlags.Dynamic);
        AddComponent(en,new GamePreComponent(){enemyPre=enemy,bulletPre=bullet,expPre=exp});
    }
}
